// DriveNotes. Copyright (c) 2011, Andrei Senchuk. All rights reserved.
package net.taviscaron.drivenotes.shared.model.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * Service entity object
 * @author Andrei Senchuk
 */
public class Service implements Serializable {
    private Long id;
    private Car car;
    private String problems;
    private String spares;
    private Float sparesCost;
    private Float serviceCost;
    private Integer odometrValue;
    private String comment;
    private Date date;

    public Service() {
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getOdometrValue() {
        return odometrValue;
    }

    public void setOdometrValue(Integer odometrValue) {
        this.odometrValue = odometrValue;
    }

    public String getProblems() {
        return problems;
    }

    public void setProblems(String problems) {
        this.problems = problems;
    }

    public Float getServiceCost() {
        return serviceCost;
    }

    public void setServiceCost(Float serviceCost) {
        this.serviceCost = serviceCost;
    }

    public String getSpares() {
        return spares;
    }

    public void setSpares(String spares) {
        this.spares = spares;
    }

    public Float getSparesCost() {
        return sparesCost;
    }

    public void setSparesCost(Float sparesCost) {
        this.sparesCost = sparesCost;
    }

    @Override
    public String toString() {
        return String.format("Service #%d: car: [%s]; problems: %s; spares: %s;" +
                "spares cost: %f; service cost: %f; odometr: %d; comment: %s;" +
                "date: %s", id, car, problems, spares, sparesCost, serviceCost,
                odometrValue, comment, date);
    }
}
